2021-04-11 05:24:20 (CEST) cTI start
% cTI_lt 0.25 using 23.619 MLIPS SICStus 3.8.5 (x86-linux-glibc2.1): Mon Oct 30 16:34:14 CET 2000.
% cTI: Rt=104ms, Wt=105ms. NTI: Rt=4ms, Wt=4ms at most 74 inferences for useful informations.
% using the norm [[_|A]=l(A)].
% NTI summary: Complete result is optimal.
app(A,B,C)terminates_if b(A);b(C).
% optimal. loops found: [app([A|_],x,[A|_])]. NTI took 4ms,72i,72i
app2(A,B,C,D)terminates_if true.
app2len(A,B,C)terminates_if b(A).
% optimal. loops found: [app2len(s(_),x,_),app2len(s(_),x,y)]. NTI took 0ms,74i,74i
list_lensx(A,B)terminates_if b(A);b(B).
% optimal. loops found: [list_lensx([_|_],s(_))]. NTI took 0ms,72i,72i
% Comparison with termination analyzers
% A termination analyser of identical power would verify
% with the following 9 proofs the 4 inferred conditions:
app(f, f, b).
% ==> termination proof established
app(b, f, f).
% ==> termination proof established
app(f, b, f).
% ==> no proof found
app2(f, f, f, f).
% ==> termination proof established
app2len(b, f, f).
% ==> termination proof established
app2len(f, b, b).
% ==> no proof found
list_lensx(f, b).
% ==> termination proof established
list_lensx(b, f).
% ==> termination proof established
list_lensx(f, f).
% ==> no proof found
2021-04-11 05:24:20 (CEST)
cTI finishedTooltip: You can skip this comparison with termination analyzers by selecting "Comp. skipped" above
Tooltip: Editing larger programs in the textarea is cumbersome. Consider using cTI within Emacs or specifying an URL!
Analyzed program:
:- cti:norm_tmap([ [_|Xs] = l(Xs) ]). app2(A,B,Bs,Cs) :- app([A,B], Bs, Cs). app([], As, As). app([E|Es], Fs, [E|Gs]) :- app(Es, Fs, Gs). list_lensx([], 0). list_lensx([_|Xs], s(N)) :- list_lensx(Xs, N). app2len(N, Bs,Cs) :- list_lensx(As, N), app(As, Bs, Cs).